<%@page import="org.soenea.doitall.domain.model.invite.Invite"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Browse Invites</title>
</head>
<body>
<h2>Browse Invites</h2>
<ul>
  <c:if test="${!empty warning}"> <b>Warning: </b> ${warning}<br/>
  </c:if>
  <c:forEach items="${invites}" var="invite">
    <%-- We could use "${pageContext.request.contextPath}/app/..." as part of the href. --%>
    <li>
      <form action="invite/${invite.id}" method="post" id="delete${invite.id}">
        <div> <a href="invite/${invite.id}">${invite.id}</a>
        User <a href="buddy/${invite.inviter.id }">${invite.inviter.userName }</a> invited <a href="buddy/${invite.invited.id }">${invite.invited.userName }</a>
        to join group <a href="group/${invite.group.id }">${invite.group.name }</a> with status ${invite.status }
          <input name="command" type="hidden" value="DeleteInvite"/>
          <input type="submit" name="button" id="button" value="Delete"/>
        </div>
      </form>
    </li>
  </c:forEach>
</ul>
<!-- 
<h3>Modify a person:</h3>
<form id="ModifyPersonForm" name="ModifyPersonForm" method="post" action="">
<fieldset>
	<legend>Person Information</legend>
 	<div><label>Name:<input type="text" name="name" id="name" /></label></div>
 	<div><label>Age: <input type="text" name="age" id="age" /></label></div>
 	<div><label>Buddy: <input type="text" name="buddy" id="buddy" /></label></div>
 	<input type="submit" name="submit" id="submit" value="Add" />
    <input name="version" type="hidden" value="${person.version}"/>
 	<input name="command" type="hidden" value="ModifyPerson" />    
</fieldset>
</form>
 -->
</body>
</html>